// import './index.scss'

interface PropsInt {
  name: string;
  prefix?: string;
  iconStyle?: React.CSSProperties;
}

export default function SvgIcon(props: PropsInt) {
  const {
    name,
    prefix = "icon",
    iconStyle = { width: "1em", height: "1em" },
  } = props;

  const symbleId = `#${prefix}-${name}`;
  return (
    <svg aria-hidden="true" style={iconStyle}>
      <use href={symbleId}></use>
    </svg>
  );
}
